/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-04-08
 * Time: 9:58
 */
import java.util.*;
public class Test1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        while(n > 0) {
            System.out.print(n+" ");
            n /= 2;
        }
    }
}
